import time


def c4(s, i):
    i += 1
    s += i
    i += 1
    s -= i
    i += 1
    s *= i
    i += 1
    s /= i
    return s, i


def loop_c4():
    start = time.time()
    i = 0
    while True:
        s, i = c4(0, i)
        end = time.time()
        cost_ns = int((end - start) * 10 ** 9)
        if end - start > 1:
            break
    return i, cost_ns


if __name__ == "__main__":
    print("n\t\t cost_ns\t ns/op\t op/ns")
    sn = 0
    sns = 0
    for i in range(0, 5):
        n, cost_ns = loop_c4()
        print("%s\t\t %s\t %s\t %s" % (n, cost_ns, int(cost_ns / n), n / cost_ns))
        sn += n
        sns += cost_ns
    print("%s\t %s\t %s\t %s" % (sn, sns, int(sns / sn), sn / sns))
    print("-----")
    print("score:  %s" % (int(sn / sns * 10 ** 6)))
    print("score2: %s" % (int(sn / sns / 0.006 * 100)))
